package com.ruoyi.mymod.controller.chicken;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mymod.service.IChickenService;
import com.ruoyi.mymod.service.IFeedService;
import com.ruoyi.mymod.utils.Dbutil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * 测试功能
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/chicken")
public class ChickenController extends BaseController
{

    @Autowired
    private IChickenService chickenService;
    /**
     * 获取菜单列表
     */
    @GetMapping("/getPriceRation")
    public AjaxResult getPriceRation() throws Exception {
        String priceRation = chickenService.getPriceRation();
        return success(priceRation);
    }

    @GetMapping("/doCalnutrition")
    public AjaxResult doCalnutrition(@RequestParam(required = false) String str,@RequestParam(required = false) String growtype) throws Exception {
        String priceRation = chickenService.doCalnutrition(str,growtype);
        return success(priceRation);
    }

    @GetMapping("/getFeedtype")
    public AjaxResult getFeedtype() throws Exception {
        String feedtypes = chickenService.getFeedtype();
        return success(feedtypes);
    }

    @GetMapping("/getGrowType")
    public AjaxResult getGrowType() throws Exception {
        String growtypes = chickenService.getGrowType();
        return success(growtypes);
    }

    @GetMapping("/getratioPrice")
    public AjaxResult getratioPrice() throws Exception {
        String ratioPrices = chickenService.getratioPrice();
        return success(ratioPrices);
    }

}
